<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>后台管理 - 开心买</title>
    <link type="text/css" rel="stylesheet" href="${project_name}/css/style.css"/>
    <script type="text/javascript" src="${project_name}/js/jquery-1.8.3.js"></script>
    <script>$(function () {
        $('.clearfix li:eq(3)').addClass('current');
    });</script>
    <link href="${project_name}/pagination/pagination.min.css" rel="stylesheet">
    <script src="${project_name}/pagination/pagination.js"></script>
    <script>
        onload = function () {
            new Pagination({
                element: '#paging', // 元素        
                type: 1, // 样式类型，可选[1,2]      
                pageIndex: '${pages.getPageNum()}', // 初始页码       
                pageSize: '${pages.getPageSize()}', // 每页数量       
                pageCount: '${pages.getPages()}', // 页码数量       
                total: '${pages.getTotal()}', // 数据总条数        
                jumper: true, // 显示输入框跳转        
                singlePageHide: false, // 只有一页时不显示分页       
                prevText: '上一页', // 上一页文字        
                nextText: '下一页', // 下一页文字       
                disabled: true, // 是否显示禁用        
                currentChange: function (index) {
                    // 页码改变时回调         
                    location = '${project_name}/back_order/show/' + index
                }
            });
        }
    </script>
</head>
<body>
<jsp:include page="public_header.jsp"/>
<div id="main" class="wrap">
    <c:import url="public_menu.jsp"></c:import>
    <div class="main">
        <h2>订单管理</h2>
        <div class="manage">
            <div class="spacer"></div>
            <table class="list">
                <tr>
                    <th>ID</th>
                    <th>姓名</th>
                    <th>发货地址</th>
                    <th>下单时间</th>
                    <th>总价格</th>
                    <th>状态</th>
                    <th>操作</th>
                </tr>
                <c:forEach items="${order}" var="o">
                <tr>
                    <td class="first w4 c">${o._1().id}</td>
                    <td class="w1 c">${o._2().consignee}</td>
                    <td class="w1 c">${o._2().details}</td>
                    <td class="w1 c">${o._1().datetime}</td>
                    <td class="w1 c">${o._1().total}</td>
                    <td class="w1 c">${o._1().status}</td>
                    <td class="w1 c">
                        <a href="${project_name}/back_order/showOne/${o._1().id}">修改</a>
                        <a href="${project_name}/back_orderRecord/show/${o._1().id}/1">查看</a>
                    </td>
                </tr>
                </c:forEach>
            </table>
        </div>
        <div id="paging"></div>
    </div>
    <div class="clear"></div>
</div>
<div id="footer">
    Copyright &copy; 2010 极客营 All Rights Reserved. 京ICP证801001号
</div>
</body>
</html>
